import httpClient from './client'

export var LOGIN = (data) => {
  return httpClient.post('/vblog/api/v1/tokens', data)
}

export var LOGOUT = (refreshToken) => {
  return httpClient.delete('/vblog/api/v1/tokens', {
    headers: {
      'X-REFRESH-TOKEN': refreshToken
    }
  })
}

export var LIST_BLOGS = (data) => {
  return httpClient.get('/vblog/api/v1/blog', {
    params: data
  })
}

export var DELETE_BLOG = (id) => {
  return httpClient.delete(`/vblog/api/v1/blog/${id}`)
}

export var UPDATE_BLOG = (id, data) => {
  return httpClient.put(`/vblog/api/v1/blog/${id}`, data)
}
export var CREATE_BLOG = (data) => {
  return httpClient.post('/vblog/api/v1/blog', data)
}

export var DESCRIBE_BLOG = (id) => {
  return httpClient.get(`/vblog/api/v1/blog/${id}`)
}
